<?PHP
	class Options {
		function parse($optionString,$separator=";",$assigner=":"){
			$optionsArray = array();
			if(strLen($optionString)>0){
				$options = explode($separator,$optionString);
				for($o=0;$o<count($options);$o++){
					$option = explode($assigner,$options[$o]);
					$optionsArray[$option[0]] = $option[1];
				}
			}
			return $optionsArray;
		}
		function build($optionsArray,$separator=";",$assigner=":"){
			//$sep = "";
			$optionsString = "";
			foreach($optionsArray as $option=>$value){
				if($optionsString != ""){
					$optionsString .= $separator;
				}
				$optionsString .= $option.$assigner.$value;
			}
			return $optionsString;
		}
	}
?>